/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package strategies;

import entities.Country;

/**
 *
 * @author KAV
 */
public class CountriesAddRowStrategy extends AddRowStrategy{

    @Override
    protected void addRow() {
        isValid = pp.getParam("edit_title").matches("[a-zA-Zа-яА-Я 0-9-]+");
    }

    @Override
    protected Object createObject() {
        return new Country(0, pp.getParam("edit_title"));
    }

}
